﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ACC.Data.Entities.Mes
{
    /// <summary>
    /// MES-SCADA-08 工单，派工单
    /// 订单
    /// </summary>
    public class MESOrder
    {
        public string order_code;
        /// <summary>
        /// 1-新增，2-修改，3-删除，4-冻结，5-取消冻结 => 1 下发， 2 冻结 - MES修改2020/03/26
        /// </summary>
        public uint order_state;
        public string factory;
        public string material_code;
        public string material_name;
        /// <summary>
        /// Pack国标码里用来标识产品规格
        /// </summary>
        public string pack_spec;
        /// <summary>
        /// 模组国标码里用来标识产品规格
        /// </summary>
        public string module_spec;
        /// <summary>
        /// 国标码里用来标识电芯类型
        /// </summary>
        public string cell_type;
        /// <summary>
        /// 标签打印用到的箱体类型
        /// </summary>
        public string box_type;
        /// <summary>
        /// 标签打印用到的箱体型号
        /// </summary>
        public string box_model;
        /// <summary>
        /// 订单数量
        /// </summary>
        public string order_num;
        public string order_stime;
        public string order_etime;

        public string center_code;
        public string center_name;
        /// <summary>
        /// 电芯批次信息(多个批次之间用[;]隔开，一般不超过7个批次)
        /// </summary>
        public string batchNum;

        public List<MESWOrkOrder> detail1;
    }

    /// <summary>
    /// 工单
    /// </summary>
    public class MESWOrkOrder
    {
        /// <summary>
        /// 工单编号
        /// </summary>
        public string work_code;  // why not wo_code?
        /// <summary>
        /// 工单数量
        /// </summary>
        public uint wo_num;
        public string work_code_stime;
        public string work_code_etime;

        /// <summary>
        /// 国标码和标签打印需要的信息
        /// </summary>
        public string box_type;     // 箱体类型
        public string box_model;    // 箱体型号

        public List<MESStationSn> detail2;
    }

    /// <summary>
    /// 工位派工单
    /// </summary>
    //public class MESStaionTask
    //{
    //    public string op_code;
    //    public string op_name;
    //    public string cell_code;
    //    public string cell_name;
    //    public string task_code;  // 工位派工单

    //    public List<MESStationSn> Detai3;
    //}

    public class MESStationSn
    {
        public string prod_sn; // 产品序列号(内码)
    }
}
